package com.yuju.account.enums;

import com.yuju.account.enums.ReserveAccountReturnCodeEnum;

/**
 * 类名：DumpRoomAccountReturnCodeEnum  <br />
 *
 * 功能：
 *
 * @author : jiaokn <br />
 * @Date : 2017年12月11日 下午4:55:55  <br />
 * @version : 1.1 <br />
 */
public enum DumpRoomAccountReturnCodeEnum {
	
	DUMPROOMACCOUNT_SAVE_SUCCESS("yuju-dumpRoomAccount-1001", "哑房账新增成功"),
	DUMPROOMACCOUNT_SAVE_FAILURE("yuju-dumpRoomAccount-1002", "哑房账新增失败"),
	DUMPROOMACCOUNT_SAVEORDER_SUCCESS("yuju-dumpRoomAccount-1003", "哑房账订单新增成功"),
	DUMPROOMACCOUNT_SAVEORDER_FAILURE("yuju-dumpRoomAccount-1004", "哑房账订单新增失败");
	
	private String code;
	private String desc;
	
	DumpRoomAccountReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (ReserveAccountReturnCodeEnum enume : ReserveAccountReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
